import java.util.Random;
import java.util.concurrent.Callable;

public class CallableExample implements Callable<Integer> {
    @Override
    public Integer call() throws Exception {
        System.out.println("子线程开始执行...");
        Thread.sleep(5000);
        int result = new Random().nextInt(1000);
        System.out.println("子线程执行结果是：" + result);
        return result;
    }
}
